package chabernac.present;

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;

import javax.mail.MessagingException;

import org.junit.Test;

public class MailMessageTest {
    @Test
    public void testSendMail() throws MessagingException {
        MailMessage theMessage = new MailMessage(
            "smtp.skynet.be",
            "guy.chauliac@gmail.com",
            new String[] { "guy.chauliac@gmail.com" } );
        theMessage.setText( "test" );
        theMessage.setSubject( "subject" );
        theMessage.send();
    }

    @Test
    public void testSocket() throws UnknownHostException, IOException {
        Socket theSocket = new Socket( "193.74.71.25", 25 );
        theSocket.close();
    }

    @Test
    public void testSocket2() throws UnknownHostException, IOException {
        Socket theSocket = new Socket( "www.google.com", 80 );
        theSocket.close();
    }

}
